'****************************************************************************'
'                                                                            '
' Copyright (C) 2010 Muhammad alaa                                           '
'                                                                            '
' This program is free software; you can redistribute it and/or modify       '
' it under the terms of the GNU General Public License as published by       '
' the Free Software Foundation; either version 2 of the License, or          '
' (at your option) any later version.                                        '
'                                                                            '
' This program is distributed in the hope that it will be useful,            '
' but WITHOUT ANY WARRANTY; without even the implied warranty of             '
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              '
' GNU General Public License for more details.                               '
'                                                                            '
' You should have received a copy of the GNU General Public License along    '
' with this program; if not, write to the Free Software Foundation, Inc.,    '
' 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.                '
'                                                                            '
'****************************************************************************'

Namespace OLE

    <ComImport()> _
    <InterfaceType(ComInterfaceType.InterfaceIsIUnknown)> _
    <Guid(IID.OLE.ITypeLib)> _
    Public Interface ITypeLib2
        <PreserveSig()> Function GetTypeInfoCount() As UInteger
        <PreserveSig()> Function GetTypeInfo(ByVal index As UInteger, <Out()> ByRef ppTI As ITypeInfo) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetTypeInfoType(ByVal index As UInteger, <Out()> ByRef pTKind As TypeKind) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetTypeInfoOfGuid(ByRef guid As Guid, <Out()> ByRef ppTInfo As ITypeInfo) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetLibAttr(<Out()> ByRef ppTLibAttr As TLibAttr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetTypeComp(<Out()> ByRef ppTComp As ITypeComp) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetDocumentation(ByVal index As Integer, <Out(), MarshalAs(UnmanagedType.BStr)> ByRef strName As String, <Out(), MarshalAs(UnmanagedType.BStr)> ByRef strDocString As String, <Out()> ByRef dwHelpContext As UInteger, <Out(), MarshalAs(UnmanagedType.BStr)> ByRef strHelpFile As String) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function IsName(<MarshalAs(UnmanagedType.LPWStr)> ByVal szNameBuf As String, ByVal lHashVal As UInteger, <Out(), MarshalAs(UnmanagedType.Bool)> ByRef pfName As Boolean) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function FindName(<MarshalAs(UnmanagedType.LPWStr)> ByVal szNameBuf As String, ByVal lHashVal As UInteger, <Out(), MarshalAs(UnmanagedType.LPArray)> ByRef ppTInfo() As ITypeInfo, <Out(), MarshalAs(UnmanagedType.LPArray)> ByVal rgMemId() As Integer, <Out()> ByRef pcFound As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function ReleaseTLibAttr(ByRef pTLibAttr As TLibAttr) As <MarshalAs(UnmanagedType.Error)> Integer

        <PreserveSig()> Function GetCustData(ByRef guid As Guid, <Out()> ByRef pVarVal As IntPtr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetDocumentation2(ByVal index As Integer, ByVal lcid As UInteger, <Out(), MarshalAs(UnmanagedType.BStr)> ByRef pbstrHelpString As String, <Out()> ByRef pdwHelpStringContext As UInteger, <Out(), MarshalAs(UnmanagedType.BStr)> ByRef pbstrHelpStringDll As String) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetLibStatistics(<Out()> ByRef pcUniqueNames As UInteger, <Out()> ByRef pcchUniqueNames As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetAllCustData(<Out()> ByRef pCustData As CustData) As <MarshalAs(UnmanagedType.Error)> Integer
    End Interface

End Namespace